package servlet;

import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

//注解
@WebServlet(urlPatterns ="/user") //urlPatterns 路径匹配
public class UserServlet extends HttpServlet {
    // get 不敏感不重要
    //Post 加密传输，注册账号等
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException {
        doPost(request,resp);
    }
    protected void doPost(HttpServletRequest request, HttpServletResponse resp)
    {
        System.out.println("UsrServlet");
    }
}

